<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" 
      xmlns:sec="http://www.pollix.at/thymeleaf/shiro">
<head th:replace="admin/common/html/head :: head_Normal(~{::title},~{::link},~{::style})">

<title th:text=${title}></title>
<!-- 这儿引用单独的css link -->
<!-- Ladda for Bootstrap 3按钮加载进度插件 -->
<link rel="stylesheet" th:href="@{/static/admin/assets/js/button/ladda/ladda.min.css}">
<!-- bootstrap-table表单样式 -->
<link th:href="@{/static/admin/assets/js/bootstrap/css/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet"/>

<style type="text/css">
/**
*这里写单独的css样式
*/

</style>

</head>

<body id="listbody">
<!-- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 代码编写处 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -->

<!-- 右边内容 -->
<div class="wrap-fluid">
    <div class="container-fluid paper-wrap bevel tlbr">
        <!-- 内容 -->
        <div class="content-wrap">
            <div class="row">
                <div class="col-sm-12">
                    <!-- 空白页开始-->
                    <div class="nest" id="Blank_PageClose">

                        <div class="body-nest" id="Blank_Page_Content">
                           <table id="dataTable" class="table-striped footable-res footable metro-blue" data-page-size="6">
                                   
                           </table>
                        </div>
                    </div>
                </div>
                <div class="col-sm-12">
                    <!-- 空白页开始-->
                    <div class="nest" >

                        <div class="body-nest" >
                            <img  th:src="@{/act/getProccessActiveNodeImage(processInstanceId = ${proInsId})}">
                        </div>
                    </div>
                </div>
                <!-- 空白页结束 -->
            </div>
            <!-- 结束内容 -->
        </div>
    </div>
</div>
<!-- 结束右边内容 -->
<!-- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 代码编写处 END# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -->







<!-- 右侧隐藏滑块内容 -->
<div th:include="admin/common/html/rightHide :: rightHide">
    
</div>
   <!-- END 右侧隐藏滑块内容-->

<!-- 通用js -->
<div th:include="admin/common/html/js :: onload_js">
   
</div>
<!-- bootstarp 表格 -->
<script th:src="@{/static/admin/assets/js/bootstrap/js/bootstrap-table/bootstrap-table.min.js}" type="text/javascript"></script>
<script th:src="@{/static/admin/assets/js/bootstrap/js/bootstrap-table/locale/bootstrap-table-zh-CN.min.js}" type="text/javascript"></script>
<script th:src="@{/static/admin/assets/js/bootstrap/js/base_list.js}" type="text/javascript"></script>
<!-- jquery-export 表格导出插件 -->
<script th:src="@{/static/admin/assets/js/bootstrap/extensions/export/bootstrap-table-export.js}" type="text/javascript"></script>
<script th:src="@{/static/admin/assets/js/bootstrap/extensions/export/tableExport.js}" type="text/javascript"></script>

<!-- 弹窗 -->
<script th:src="@{/static/admin/assets/js/layer/layer.js}" type="text/javascript"></script>
<!-- 遮罩层 -->
<script th:src="@{/static/admin/assets/js/blockUI/jquery.blockUI.js}" type="text/javascript"></script>
<script th:src="@{/static/js/longToDateStr.js}" type="text/javascript"></script>

<script th:inline="javascript" type="text/javascript">

    var processInstanceId = [[${proInsId}]]

<!-- 导出 -->
var dataUrl=window.rootPath+"/act/getTaskNodesByProcessInstance?processInstanceId="+processInstanceId
var removeUrl=window.rootPath+"/AppealInfoController/remove";
var createUrl=window.rootPath+"/AppealInfoController/add";
var updateUrl=window.rootPath+"/AppealInfoController/edit/{id}";
var exportUrl=window.rootPath+"/AppealInfoController/export";
  var options = {
		dataUrl: dataUrl,
        createUrl: createUrl,
        updateUrl: updateUrl,
        removeUrl:removeUrl,
        exportUrl: exportUrl,
        sortName: "roleSort",
        modalName: "任务列表",
        search: false,
	   dataColumns: [

			/*{
			    field: 'id',
			    title: 'ID',
			    //visible: true, //隐藏
			    //searchable: false,//搜索
			    //sortable:false,//设置true为允许列可以排序
			    //order: asc //排序顺序
			},*/
			{
			    field: 'name',
			    title: '任务节点名称'
			    //visible: false, //隐藏
			    //searchable: false,//搜索
			    //sortable:false,//设置true为允许列可以排序
			    //order: asc //排序顺序
			},
           {
               field: 'userName',
               title: '任务处理人'
           },
			{
			    field: 'createTime',
			    title: '创建时间'
			},
           {
               field: 'endTime',
               title: '结束时间'
           },
			{
			    field: 'formInstanceId',
			    title: '绑定的表单',
                formatter: function (value, row, index) {
                    var actions = [];
                    actions.push('<a title="点击查看详情" href="javascript:formInstanceView(\''+value+'\')">表单</a>');
                    return actions.join('');
                }
			},
			/*{
			    field: 'processInstanceId',
			    title: '流程实例id'
			},*/{
               title: '状态',
               formatter: function (value, row, index) {
                   var endTime = row.endTime;
                   var actions = [];
                   if(endTime){
                       actions.push('<span class="label label-success">已处理</span> ');
                   }else{
                       actions.push('<span class="label label-primary">待处理</span> ');
                   }
                   return actions.join('');
               }
           }]
  };
$(function(){
	var oTab=$.table.oTableInit(options);
	oTab.Init();
})
function formInstanceView(formInstanceId){
    var index=layer.open({
        area: ['600px', '450px'],
        maxmin: true,
        type: 2,
        title:'表单详情',
        content: '/AppealInfoController/formInstanceView?formInstanceId='+formInstanceId,
    });
    layer.full(index);
}


</script>

</body>


</html>
